﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace QYmall.Core.Model.Models
{
    /// <summary>
    /// 商户收款方式
    /// </summary>
    public class MerchantPayinfo
    {
        /// <summary>
        /// 自增ID
        /// </summary>
        [Display(Name = "自增ID")]
        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public long Id { get; set; }

        /// <summary>
        /// 所属商户ID
        /// </summary>
        [Display(Name = "所属商户")]
        [ForeignKey("Merchant")]
        public int MerchantId { get; set; }

        /// <summary>
        /// 转账类型
        /// </summary>
        [Display(Name = "转账类型")]
        [StringLength(128)]
        public string? PayType { get; set; }

        /// <summary>
        /// 姓名
        /// </summary>
        [Display(Name = "姓名")]
        [StringLength(128)]
        public string? FullName { get; set; }

        /// <summary>
        /// 开户银行
        /// </summary>
        [Display(Name = "开户银行")]
        [StringLength(128)]
        public string? BankName { get; set; }

        /// <summary>
        /// 收款账号
        /// </summary>
        [Display(Name = "收款账号")]
        [StringLength(128)]
        public string? AccountNo { get; set; }

        /// <summary>
        /// 收款二维码
        /// </summary>
        [Display(Name = "收款二维码")]
        [StringLength(512)]
        public string? QRCode { get; set; }

        /// <summary>
        /// 已删除：0否1是
        /// </summary>
        [Display(Name = "状态")]
        [Range(0, 9)]
        public byte IsDelete { get; set; } = 0;

        /// <summary>
        /// 创建人
        /// </summary>
        [Display(Name = "创建人")]
        [StringLength(128)]
        public string? AddBy { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [Display(Name = "创建时间")]
        public DateTime AddTime { get; set; } = DateTime.Now;


        /// <summary>
        /// 商户信息
        /// </summary>
        public Merchants? Merchant { get; set; }
    }
}
